package neu.soft.mapper;

import neu.soft.entity.Invoice;
import neu.soft.entity.InvoiceGoodInfo;
import neu.soft.query.BasePageQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InvoiceMapper {

    int addInvoice(Invoice invoice);

    List<Invoice> findByPage(BasePageQuery basePageQuery);

    Invoice findById(Long invoiceId);

    void batchInsertGoodInfo(List<InvoiceGoodInfo> invoiceGoodInfoList);

    void insertOrderAndInvoice(@Param("invoiceId") Long invoiceId, @Param("orderId") String orderId);

    Long findInvoiceByOrderId(@Param("orderId") String orderId);//通过订单或者购货单id找到发票

    int findInvoiceOrderId(String orderId);//查询是否已经登记

    void update(@Param("invoiceId") Long invoiceId,@Param("invoiceType") String invoiceType);
}
